A digital alkali spin maser

Self-oscillating atomic magnetometers, in which the precession of atomic spins in a magnetic field is driven by resonant modulation, offer high sensitivity and dynamic range. Phase-coherent feedback from the detected signal to the applied modulation creates a resonant spin maser system, highly responsive to changes in the background magnetic field. Here we show a system in which the phase condition for resonant precession is met by digital signal processing integrated into the maser feedback loop. This system uses a modest chip-scale laser and mass-produced dual-pass caesium vapour cell and operates in a 50 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mu $$\end{document}μT field, making it a suitable technology for portable measurements of the geophysical magnetic field. We demonstrate a Cramér-Rao lower bound-limited resolution of 50 fT at 1 s sampling cadence, and a sensor bandwidth of 10 kHz. This device also represents an important class of atomic system in which low-latency digital processing forms an integral part of a coherently-driven quantum system.

Consider the measurement of a slowly varying magnetic field B 0 , the magnitude of which we determine through N independent measurements of duration τ , giving a bandwidth of (2τ ) −1 . The resolution of each measurement is given by Eq. (2), and we can find that the bandwidth-adjusted noise floor, commonly referred to as the sensitivity of the magnetometer, is proportional to τ −1 , and given by in units nT · Hz −1/2 .
In the case of a freely precessing magnetometer, the atomic coherence time T 2 limits the duration of each measurement to τ ≃ 2T 2 , fixing the minimum noise floor to this physical property of the atomic system. By contrast, a continuously oscillating signal may be sampled at a rate chosen to optimally cover the desired signal bandwidth and hence achieve the highest possible sensitivity to the desired signal source.
To achieve such a continuous atomic spin resonance, alkali spin masers have been realised using electronic feedback, using analogue phase shift and homodyne detection 6 . However, to reduce reliance on manually tuned analogue electronics, we use a continuous low-latency digital filter to drive resonant atomic spin precession in a 133 Cs sample, implemented in firmware running on a field-programmable gate array (FPGA). In a practical sensor this represents a more scalable, flexible and portable option than analogue electronic feedback. This approach is particularly powerful in situations where the resonance phase condition is not known, for example in arbitrary geometries of the magnetic field or optical polarisation 17 . We implement a pair of matched finiteimpulse response (FIR) filters, exploiting their fixed-phase output to generate the full analytic signal, from which a frequency-agnostic constant-phase-shifted signal can be generated and applied as magnetic feedback to drive the 133 Cs spins. We describe the spontaneous emergence and amplification of resonant dynamics in this digitalatomic system, measure the signal-to-noise achieved in a compact sensor package, and characterise the system bandwidth and uniformity of response to rapid variation in the measured magnetic field.

Results
A detailed description of the spin maser package (Fig. 1) and the firmware design for resonant B RF feedback is given in "Methods" section.
Digital spin maser resonance. Figure 2 shows the polarimeter signal response following closure of the FPGA dual-FIR filter feedback loop between the polarimeter signal and the B RF feedback coil, while the sensor www.nature.com/scientificreports/ is held in a shielded magnetic field B 0 = 50 µT . This feedback is tuned on at t = 0 s and within 300 µs an oscillating signal is spontaneously generated at the 133 Cs Larmor frequency ∼ 175 kHz. Figure 3 shows the spectrum around the magnetic resonance frequency for steady-state operation in a stable B 0 field of 50 µT , allowing the ratio of signal amplitude to noise density A/ρ to be estimated. The observation of 70 dB spurious-free dynamic range (SFDR) ( A/ρ = 3162 Hz 1 2 ), allows the optimum magnetic resolution B min and sensitivity δB min to be estimated for a measurement time τ = 1 s using Eqs. (2) and (3) respectively. We obtain B min = 50 fT and δB min = 70 fT · Hz −1/2 respectively, representing the CRLB-limited resolution of a 1 s duration measurement and the corresponding bandwidth-adjusted sensitivity of this measurement.
Bandwidth of field response. The low-latency feedback circuit allows very rapid response between changes in the magnetic field and the observed resonance frequency. The upper limit on this response is given by the phase update rate of 1 MHz. In practice, the extraction of frequency data at this rate is hard to achieve due to limitations on data transfer rates between the FPGA and analysis software. However, the real-time firmware generation of the analytic signal (see "Methods" section) allows the real-time phase to be found on each data sample cycle (1 MHz in this case).
From the real-time phase, the instantaneous phase step is found by numerical differentiation, and this 1 MHz data is down-sampled to 20 kHz for transfer and analysis. The phase step can then be rescaled to the instantaneous  www.nature.com/scientificreports/ frequency, and a time series of B 0 (t) data recorded. A small low-impedance coil of six turns was used to generate an additional 10 nT oscillating field parallel to B 0 , and the observed sensor response to this field extracted by demodulation of recorded B 0 (t) data. Figure 4 shows this response, demonstrating uniform sensor response up to the transfer Nyquist limit of 10 kHz, with the expected amplitude reduction due to under-sampling around the Nyquist frequency visible.

Discussion
Self-oscillating spin resonance. We have confirmed that resonant self-oscillating behaviour emerges in the digital-atomic system following the activation of the feedback loop (Fig. 2). The response of this resonant oscillator to changes in the local magnetic field is limited to 10 kHz by the Nyquist limit on data transfer (Fig. 4), indicating that atomic system response does not impose a bandwidth limit below this frequency. The FIR filter architecture provides a flexible and powerful tool for defining the frequency-domain response of the system and allows a real-time estimator for the resonance frequency to be obtained. The use of a digital processor to modify and define spin maser feedback, governing and driving the inversion of Zeeman states, on a timescale faster than their precession is a valuable capability with potential for elaboration and further study. Interaction with alkali vapour ground-state Zeeman levels in geophysical fields offers a convenient sub-MHz frequency range for digital feedback and manipulation. In theses systems the use of well-established optical pumping techniques allows preparation of highly-polarised ensembles. The increasing processing power, availability and scalability of embedded processors will continuously offer enhanced impact in the manipulation of quantum systems and their application to portable devices. Development of this work has potential for study of modified spin dynamics, through infinite-impulse response (IIR) filtering, or the use of Bayesian estimation, such as Kalman filtering, to achieve CRLB-limited real-time frequency estimation.
Geophysical magnetic resolution. The resolution of this digital spin maser system as a geophysical magnetometer can be estimated from the measured signal-to-noise-density (Fig. 3). Based on this we estimate the CRLB-limited root-mean-square resolution of this sensor to be 50 fT at 1 s sampling cadence. This measurement benefits from the persistent driven atomic oscillation, which allows τ to be chosen on the basis of signal bandwidth, rather than limited by atomic coherence T 2 . The system also enjoys a 100% duty cycle, without down-time for cell heating or pump laser operation. The sensor hardware used is rather modest; a single VCSEL for optical pumping and probing and a mass-produced double-pass MEMS alkali vapour cell 18 . This is reflected in the signal-to-noise-density ratio observed. Several well-established techniques could be used to significantly enhance signal-to-noise, such as the use of a multi-pass vapour cell 19 or the use of a re-pumping laser to achieve light-narrowing 20 .
Potential applications. The combination of these optical magnetometry techniques with the digital feedback loop demonstrated here would constitute a geophysical magnetometer of outstanding resolution, significantly exceeding parts-per-billion resolution in the Earth's field. The key advantage unlocked by the digital spin maser demonstrated here is to permit magnetic measurement by frequency estimation of a persistent resonant oscillation, not limited by atomic relaxation lifetime. In practical applications this frequency estimation may be implemented using a CRLB-limited algorithm running on a modest processor 21 . In addition, the on-resonance www.nature.com/scientificreports/ phase-shift is a variable and optimised free parameter in this sensor. The capacity to vary this parameter dynamically is a unique advantage of the reported technique, offering the potential to exploit the phase-angle relations present in B RF -modulated atomic alignment magnetometry 17 , allowing vector readout of a single-channel geophysical optical magnetometer 22 .

OPM sensor head.
Since the aim of our work is the development of practical atomic sensors for real-world magnetic measurements, we have utilised a compact, fully integrated sensor module, shown in Fig. 1. This sensor module is built around a 133 Cs atomic sample, hermetically sealed within a glass-silicon micro-fabricated cell of outer dimensions 10 x 10 x 5.5 mm 18 . The caesium atoms, introduced by azide decomposition, inhabit a cavity of approximate dimensions 6 x 6 x 5 mm. One wall of this cavity is formed by a silicon wafer, which is around 30% reflective at the operating wavelength of 894.6 nm. A single-mode vertical-cavity surface emitting laser (VCSEL) of output 300 µ W at this wavelength is collimated to a beam diameter of 3.2 mm, circularly polarised and used to optically pump the caesium vapour, which is heated to 80 • C using a non-inductively wound Ohmic heater driven at 390 kHz. The rate of depolarising caesium-wall collisions is reduced by use of 250 torr N 2 buffer/quenching gas, and for optimum magnetic resonance amplitude, the VCSEL is 15 GHz blue-detuned from the unresolved D1 absorption line of the caesium vapour. The oscillating optical rotation induced by the atomic sample is detected by polarisation measurement of the transmitted light using a polarimeter, comprising a polarising beam-splitter and differential photodiode circuit. Magnetic modulation and feedback is implemented using a single-turn coil to generate an oscillating field B RF on the axis perpendicular to the incident and reflected light propagation.
Test conditions. To establish its performance under optimal conditions, the entire sensor module is placed within a degaussed five-layer mu-metal magnetic shield, to eliminate external noise sources and allow a static magnetic field B 0 ≃ 50 µ T to be applied. This field is established at an angle of 45 • to the incident light propagation axis, the optimal operating geometry for an M x magnetometer 3 . Further studies under variable B 0 orientation will quantify its effect on signal amplitude and heading error. We note useful prior work on B 0 orientation effects on similar sensor configurations 23 . Under optical pumping from the incident light, a net spin orientation moment is generated configurations. within the atomic sample, which precesses about B 0 at a frequency f L = γ B 0 . With the application of a small B RF field at this frequency the atomic coherence can be driven and maintained, provided a π/2 radian phase shift is maintained between the phase of B RF and the polarimeter signal. Under transformation to a frame co-rotating about B 0 with B RF the magnitude of the spin coherence, which is quasi-static in this frame, increases up to a maximum limited by B RF saturation, which dominates for γ B RF > T −1 . In this frame the maximised static spin coherence corresponds to a driven inversion of the ground-state Zeeman populations away from their equilibrium unpolarised values.
Filter design and firmware implementation. The generation of this phase-coherent feedback in a frequency-invariant manner from the polarimeter signal is achieved using dual FIR filters to generate both a filtered signal and its Hilbert transform. This exploits the symmetries of linear-phase FIR filters, in this case, odd-coefficient even symmetry (Type 1) and odd symmetry (Type 3) filters. The phase response of a Type 3 FIR filter will be π/2 radian offset from that of a Type 1 filter of equal coefficient vector length 24 .
The design of these dual filters was optimised in the following way. The passband was defined as 150 -220 kHz to cover a suitable range for a 133 Cs spin maser operating in geophysical fields around latitudes of 56 • N, and the filter performance was optimised over a wider band of 0.001-400 kHz. The method for FIR filter design described here would work for any geophysical passband, allowing sensor operation at different latitude ranges to be achieved with firmware changes. The signal fixed-point representation was defined as 16 bits to match the analogue-digital converter (ADC) resolution, and the ADC sampling rate was specified (1 MS/s). For a given length n of FIR coefficient vector, a windowed filter design tool was used to generate fixed-point coefficients for a Type 1 band-pass coefficient vector h 1 (n) . The amplitude and phase response of filter h 1 (n) was found by Fourier transformation, including the effects of fixed-point representation rounding errors. The required π/2 radian phase difference of the Type 3 filter was locked by symmetry but the amplitude response was a function of the (n − 1)/2 free parameters in the Type 3 coefficient vector h 3 (n) . h 3 (n) was found iteratively by minimising the root-mean-square residual in the ratio of the amplitude response of h 1 (n) to h 3 (n) integrated over 0.001 -400 kHz using a Levenberg-Marquardt algorithm. The coefficient vector length n was allowed to vary freely between 9 and 53, and a range of band-pass filter windows were investigated. Figure 5 shows the amplitude and phase response of the optimum filter, generated with n = 23 coefficients and an Exact Blackman window function. A root-mean-square ratio residual of 2.23 × 10 −5 between the amplitude response of the Type 1 and Type 3 filters was obtained.
The output of the Type 1 and Type 3 filters can be considered the real and imaginary parts of the complexplane analytic signal, allowing synchronous calculation of the signal phase by trigonometry on each ADC clock cycle. The live signal phase thus obtained is represented by a signed 18-bit fixed point number representing a phase between -π and π radian. This choice of fixed-point representation for signal phase allows phase wrapping to be unwrapped without additional operation or resolution loss by fixed point overflow. The feedback phase is found by manually shifting the signal phase by π/2 radian, and a CORDIC trigonometry algorithm used to generate phase-coherent B RF modulation (with a fixed amplitude below the saturation threshold), which is output to a single-turn coil at the magnetometer cell using an digital-to-analogue converter (DAC) and buffer amplifier. The live phase is also numerically differentiated to obtain a live estimate for the oscillation frequency, as described in "Results" section. Calculated results for the amplitude and phase frequency response of the dual FIR filters, including the effects of fixed-point signal representation. The solid curves show the relative amplitude response of the matched type 1 (red) and type 3 (blue) filters, and the ratio of their amplitudes (black). The dashed lines show the phase shift of the type 1 (red) and type 3 (blue) filters, along with their difference (black). The upper plot shows the amplitude ratio and phase difference in detail. Note that the phase difference is fixed to π/2 radian by filter coefficient symmetry.